package com.heima.wemedia.controller.v1;


import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.wemedia.service.IWmChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 频道信息表 前端控制器
 * </p>
 *
 * @author lcz
 * @since 2024-11-20
 */
@RestController
@RequestMapping("/api/v1")
public class WmChannelController {


    @Autowired
    private IWmChannelService iWmChannelService;

    @GetMapping("/channel/channels")
    public ResponseResult list() {
        List<WmChannel> list = iWmChannelService.list();
        return ResponseResult.okResult(list);
    }
}
